DECLARE @Command VARCHAR(MAX)
DECLARE @CleanupTime INT
DECLARE @String VARCHAR(100)

SET @CleanupTime = ?
SET @String = '@CleanupTime = ' + CAST(@CleanupTime AS VARCHAR(200))

BEGIN
	SELECT @Command = REPLACE(sjs.command,'@CleanupTime = 24',@String) FROM msdb.dbo.sysjobsteps sjs
	JOIN msdb.dbo.sysjobs sj
	ON sjs.job_id = sj.job_id
	WHERE sjs.step_id = 1 AND sj.name = 'DatabaseBackup - SYSTEM_DATABASES - FULL'

	EXEC msdb..sp_update_jobstep @job_name = 'DatabaseBackup - SYSTEM_DATABASES - FULL', @step_id = '1', @command = @Command

	SELECT @Command = REPLACE(sjs.command,'@CleanupTime = 24',@String) FROM msdb.dbo.sysjobsteps sjs
	JOIN msdb.dbo.sysjobs sj
	ON sjs.job_id = sj.job_id
	WHERE sjs.step_id = 1 AND sj.name = 'DatabaseBackup - USER_DATABASES - DIFF'

	EXEC msdb..sp_update_jobstep @job_name = 'DatabaseBackup - USER_DATABASES - DIFF', @step_id = '1', @command = @Command

	SELECT @Command = REPLACE(sjs.command,'@CleanupTime = 24',@String) FROM msdb.dbo.sysjobsteps sjs
	JOIN msdb.dbo.sysjobs sj
	ON sjs.job_id = sj.job_id
	WHERE sjs.step_id = 1 AND sj.name = 'DatabaseBackup - USER_DATABASES - FULL'

	EXEC msdb..sp_update_jobstep @job_name = 'DatabaseBackup - USER_DATABASES - FULL', @step_id = '1', @command = @Command

	SELECT @Command = REPLACE(sjs.command,'@CleanupTime = 24',@String) FROM msdb.dbo.sysjobsteps sjs
	JOIN msdb.dbo.sysjobs sj
	ON sjs.job_id = sj.job_id
	WHERE sjs.step_id = 1 AND sj.name = 'DatabaseBackup - USER_DATABASES - LOG'

	EXEC msdb..sp_update_jobstep @job_name = 'DatabaseBackup - USER_DATABASES - LOG', @step_id = '1', @command = @Command
END